//
//  DHBaseViewController.m
//  DHKuaiYi
//
//  Created by xiaohuihui on 2016/11/13.
//  Copyright © 2016年 30-陈辉华. All rights reserved.
//

#import "DHBaseViewController.h"

@interface DHBaseViewController ()

@end

@implementation DHBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self xhhSetupSubviews];
    [self xhhSetupNavigationItems];
}

- (void)xhhSetupSubviews {
    //    self.view.backgroundColor = [UIColor XHH_randomColor];
}

- (void)xhhSetupNavigationItems {
    
    //修改navigationBar的字体颜色还有返回箭头颜色
    UIBarButtonItem *backButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:nil action:nil];
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    
    self.navigationItem.backBarButtonItem = backButtonItem;
    
}

- (UIViewController *)getControllerWithClassName:(NSString *)clsName {
    UIViewController *vc = [[NSClassFromString(clsName) alloc] init];
    return vc;
}

@end
